Versions:

  • 0.3.0
  • 0.1.14

logx is a small, zero-dependency command-line tool published by AyoubTadlaoui that pretty-prints JSON slog logs for easier reading during development and debugging. It consumes structured log records written in the standard Go log/slog JSON format and renders them as colored, human-friendly lines, transforming dense machine-oriented output into something developers can scan quickly. The software fits within the developer tools and logging utilities category, and it is currently available at version 0.3.0, with two versions released to date, indicating an actively maintained early-stage project. The tool is designed for flexible input handling in typical command-line workflows. It accepts log data from stdin pipelines, making it easy to chain after other commands, and it also reads directly from file arguments for reviewing captured logs. A tail-style follow mode allows continuous monitoring of a growing log file in real time, similar to tail -f, which is useful when watching a running service. To help narrow down large volumes of output, logx provides level filtering, so users can display only messages at or above a chosen severity, as well as substring grep functionality to search for specific text within records. A notable behavior is that non-JSON lines pass through unchanged rather than being dropped or mangled, ensuring that unexpected output such as stack traces and runtime panics is not swallowed when logs are piped through the formatter. Typical use cases include local development of Go applications that emit slog JSON output, inspection of production or staging log files, live log monitoring during testing, and quick triage of errors by filtering on level or keyword. Because it carries zero dependencies, logx can be deployed and run with minimal setup, and its focused scope makes it a lightweight companion for any workflow where structured JSON logs need to become readable at the terminal without configuring a full log aggregation stack.

Tags: